<extend name="Public:Base" />
<block name="content">
	<div class="main-title">
		<h2><eq name="ACTION_NAME" value='add'>新增<else />编辑</eq>菜单 [ <A HREF="__URL__">返回列表</A> ]</h2>
	</div>
	<FORM METHOD="POST" id="form1" class="form-horizontal" action="__URL__/<eq name="ACTION_NAME" value="add">insert<else />update</eq>" enctype="multipart/form-data">
		<div class="form-item cf">
			<label class="item-label">标题：</label>
			<div class="controls"><INPUT TYPE="text" class="text input-largeRequire"  NAME="title" value="{$vo.title}"></div>
		</div>
		<div class="form-item cf">
			<label class="item-label">名称：</label>
			<div class="controls"><INPUT TYPE="text" class="text input-large"  NAME="name" value="{$vo.name}"></div>
		</div>
		<div class="form-item cf">
			<label class="item-label">链接：</label>
			<div class="controls"><INPUT TYPE="text" class="text input-large"  NAME="link" value="{$vo.link}"></div>
		</div>
		<div class="form-item cf">
			<label class="item-label">TARGET：</label>
			<div class="controls">
				<SELECT class="text input-large" NAME="target">
					<option <eq name="vo.target" value='' >selected</eq> value=""></option>
					<option <eq name="vo.target" value='_blank' >selected</eq> value="_blank">BLANK</option>
					<option <eq name="vo.target" value='_top' >selected</eq> value="_top">TOP</option>
					<option <eq name="vo.target" value='_new' >selected</eq> value="_new">NEW</option>
				</SELECT>
			</div>
		</div>
		<div class="form-item">
			<INPUT TYPE="hidden" name="level" value="{$level}">
			<INPUT TYPE="hidden" name="pid" value="{$pid}">
			<INPUT TYPE="hidden" name="id" value="{$vo.id}">
			<INPUT TYPE="hidden" name="jumpurl" value="{$Think.server.HTTP_REFERER}">
			<button type="submit" class="btn submit-btn ajax-post">确 定</button>
			<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
		</div>
	</FORM>
	<script type="text/javascript">
	$(function(){
		$('#form1').Validform({
			tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                	var pele=o.obj.parents('.form-item');
                    var infoObj=pele.find(".check-tips");
                    if (!infoObj || infoObj.length==0){
                        pele.find(".item-label").append('<span class="check-tips"></span>');
                    }
                    infoObj=pele.find(".check-tips");
                    if(o.type==2){
                        infoObj.removeClass('error');
                        infoObj.hide();
                    }else{
                        infoObj.addClass('error');
                        infoObj.html(msg).show();
                    }
                }
            }
		});
	})
	</script>
</block>